from app.web import abstract
from app import models

class Action(abstract.Action):
    
    def get(self):

        wish_ids = self.request.get('id')
        wish_id = abstract.utils.ids2id(wish_ids)
        wish = models.wish.wishById(wish_id)
        
        if not wish: return

        self.response.headers['Content-Type'] = "image"
        self.response.out.write(wish.image)